setup.sh Fixes for updated repository structure#62
setup.sh Fixes for updated repository structure#62uhbuhb wants to merge 2 commits intodanielmiessler:mainfrom
Conversation
Problems fixed: • ask_input function wasn't displaying user input - shell only showed options, not the question • Shell detection used runtime variables, always detected bash even when user's login shell was zsh • PAI_DIR variable pointed to repo root instead of .claude directory, breaking environment setup • Claude Code integration failed when ~/.claude already existed as directory or symlink • settings.json retained template values instead of user's AI name, color, and paths Implementation: • Moved setup.sh from .claude/ to repository root for easier access via curl • Fixed ask_input by redirecting prompt to stderr (line 99), allowing input to display properly • Introduced INSTALL_DIR for repo root, set PAI_DIR to .claude directory (v0.6.0+ structure) • Use $SHELL variable for shell detection instead of runtime variables, added fish support • Rewrote Claude Code integration to detect and backup existing directories/symlinks before linking • Auto-update settings.json with user's custom AI name, color, PAI_DIR, and PAI_HOME values 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The context/CLAUDE.md file was removed in the repository restructuring and apprently relevant context is now attached automatically.
Merging comprehensive setup.sh fixes that resolve critical installation bugs: **Critical Fixes:** - ✅ Creates ~/.claude/hooks symlink (hooks were never firing without this!) - ✅ Creates ~/.claude/skills symlink (skills were never loading!) - ✅ Creates ~/.claude/scratchpad directory - ✅ Fixes PAI_DIR path bug (settings.json symlink pointed to wrong location) - ✅ Adds Linux support with platform detection (Debian/Ubuntu tested) - ✅ Fixes prompt display issues for curl piping - ✅ Git stash/pop for safe re-runs and testing **Testing:** - Tested on Debian 13.1 and Ubuntu MATE 24.04 - Comprehensive error handling and backup logic - Proper user prompts and safety checks **Credit:** Huge thanks to @0xsalt for the extensive testing and comprehensive fix! This PR fixes 6 out of 7 critical bugs (86%) - the remaining context/CLAUDE.md cleanup was added separately. Related: Addresses issues mentioned in #67 and #62
|
Thank you @uhbuhb for the comprehensive PR identifying the v0.6.0 restructuring issues! Your PR correctly identified several critical bugs: Why we're not merging this PR:
The context/CLAUDE.md cleanup you identified was added separately in commit c36143e. Your analysis was excellent! Note on setup.sh location: Thank you for the thorough analysis and contribution! 🙏 |
|
Closing as the issues are now fixed in main via PR #54 + commit c36143e. Thank you for identifying the v0.6.0 issues! |
…essler#62) Adds a suite of cross-reference tests to ensure that the primary documentation markdown files correctly link to each other and that the internal paths actually exist. Fixed a broken dynamic state path (work.json -> events.jsonl) in v4.0-alpha.md. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: rikitikitavi2012-debug <240362902+rikitikitavi2012-debug@users.noreply.github.com>
The latest project restructuring totally broke the setup.sh script. Lets fix it :)
Also removed references to context/CLAUDE.md file in agent instructions, as that file has been removed in the repository restructuring.
Problems fixed:
• ask_input function wasn't displaying user input - shell only showed options, not the question
• Shell detection used runtime variables, always detected bash even when user's login shell was zsh
• PAI_DIR variable pointed to repo root instead of .claude directory, breaking environment setup
• Claude Code integration failed when ~/.claude already existed as directory or symlink
• settings.json retained template values instead of user's AI name, color, and paths
Implementation:
• Moved setup.sh from .claude/ to repository root for easier access via curl
• Fixed ask_input by redirecting prompt to stderr (line 99), allowing input to display properly
• Introduced INSTALL_DIR for repo root, set PAI_DIR to .claude directory (v0.6.0+ structure)
• Use $SHELL variable for shell detection instead of runtime variables, added fish support
• Rewrote Claude Code integration to detect and backup existing directories/symlinks before linking
• Auto-update settings.json with user's custom AI name, color, PAI_DIR, and PAI_HOME values